﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserScore.aspx.cs" Inherits="OnLineExam.Web.mag.UserScore" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../jquery-easyui-1.2.5/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../jquery-easyui-1.2.5/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../jquery-easyui-1.2.5/jquery-1.7.1.min.js" type="text/javascript"></script> 
    <script src="../jquery-easyui-1.2.5/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../Scripts/jQuery.FillOptions.js" type="text/javascript"></script>
    <script src="../jquery-easyui-1.2.5/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="UserScore.js" type="text/javascript"></script>
    <script type="text/javascript"><!--
        $(function () { 
            $("#selectDep").FillOptions('GetDepInfoHandler.ashx?c=' + new Date().getMilliseconds() + '&type=getlist&depid=<%=Umodel.DepID %>', { datatype: "json", textfield: "Name", valuefiled: "ID" });
            $("#selectCourse").FillOptions('GetCourseHandler.ashx?c=' + new Date().getMilliseconds() + '&type=getlist&depid=<%=Umodel.DepID %>', { datatype: "json", textfield: "CourseName", valuefiled: "CourseID" });
            <%if (User.IsInRole("教师")){ %>
                $("#dd table tr").eq(0).hide();
                        //$("#selectDep").attr("disabled", 'disabled'); //默认选中disabled
                        <%} %>
            $("#selectDep").change(function () {
            $("#selectCourse").empty();
             $("#selectCourse").FillOptions('GetCourseHandler.ashx?c=' + new Date().getMilliseconds() + '&type=getlist&depid='+$("#selectDep").val(), { datatype: "json", textfield: "CourseName", valuefiled: "CourseID" });
             });

            $('#tt').datagrid({

                idField: 'ID',
                url: 'Handler/ScoreHandler.ashx?c=' + new Date().getMilliseconds() + '&type=getlist&depid=<%=Umodel.DepID %>', //?startIndex=0&endIndex=20  /''+ index +'/'
                singleSelect: true,
                columns: [[
                   { field: 'ID', title: '序号', width: 80 },
                  { field: 'UserID', title: '工号', width: 100 },
                  { field: 'PaperID', title: '试卷编号', width: 80 },
                  { field: 'SingleProblemMark', title: '单选题', width: 80 },
                  { field: 'MultiProblemMark', title: '多选题', width: 80 },
                  { field: 'JudgeProblemMark', title: '判断题', width: 80 },
                  { field: 'FillBlankProblemMark', title: '填空题', width: 80 },
                  { field: 'QuestionProblemMark', title: '问答题', width: 80 },

                  { field: 'opt', title: '操作', width: 100, align: 'center',
                      formatter: function (value, rec, index) {
                          var e = '<a href="#" mce_href="#" onclick="edit(' + rec.ID + ')">批卷</a> ';
                          var d = '<a href="#" mce_href="#" onclick="del(' + index + ')">删除</a> ';
                          return e ;
                      }
                  }
                ]], toolbar: [{
                    text: '增加', iconCls: 'icon-add', handler: function () {
                    //add();
                    }
                } ,
                { text: '查找', iconCls: 'icon-search' }
                ],
                pagination: true, rownumbers: true
            });
        })
// --></script>
</head>
<body>
    <table id="tt"></table>
    <div id="dd" class="easyui-dialog" style=" height:650px; width:500px;padding:10px 20px" closed="true" buttons="#dd-buttons">  
     <form id="ff" method="post">
     <input id="hdType" name="hdType" type="hidden" />
     <input id="hdID" name="hdID" type="hidden" /> 
     <input id="hdDepID" name="hdDepID" type="hidden" value='<%=Umodel.DepID %>' />
     <table id="tbsingle"></table>
    <table id="tbmulti"></table>
    <table id="tbjudge"></table>
    <table id="tbfillblank"></table>
    <table id="tbquestion"></table>
  </form>
</div>
<div id="dd-buttons">
		<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="save()">保存</a>

		<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dd').dialog('close')">取消</a>

	</div>

 
</body>
</html>